<?php defined('SYSPATH') or die('No direct script access.');

// Класс для вычислений

class Kohana_Soap_Calc extends Kohana_Soap {
	
	
	
	public function __construct($config = array())
	{
		parent::__construct($config);
		// Подключаемся к странице front
		$this->connect('front');
	}
	// Деление
	public function divide($token,$num1,$num2)
	{
		$res = $this->_client->divide(Array("token"=>$token,"num1"=>$num1,"num2"=>$num2));		
		return $this->getResult($res);		 
	}
	//Умножение
	public function multiply($token,$num1,$num2)
	{
		$res = $this->_client->multiply(Array("token"=>$token,"num1"=>$num1,"num2"=>$num2));		
		return $this->getResult($res);		 
	}
	//Сложение
	public function plus($token,$num1,$num2)
	{
		$res = $this->_client->plus(Array("token"=>$token,"num1"=>$num1,"num2"=>$num2));		
		return $this->getResult($res);		 
	}
	//Вычитание
	public function minus($token,$num1,$num2)
	{
		$res = $this->_client->minus(Array("token"=>$token,"num1"=>$num1,"num2"=>$num2));		
		return $this->getResult($res);		 
	}
	
}